package pendotech.com.pendootg.mvp;

import pendotech.com.pendootg.bean.Account;
import pendotech.com.pendootg.callback.MCallback;

/**
 * Created by dh on 2022/1/10.
 */

public class MvpPresent {

    private ImvpView imvpView;
    private MvpModel mvpModel;

    public MvpPresent(ImvpView imvpView) {
        this.imvpView = imvpView;
        mvpModel = new MvpModel();
    }


    public void getData(String accountName) {
        mvpModel.getAccountData(accountName, new MCallback() {
            @Override
            public void onSuccess(Account account) {
                imvpView.showSuccessMsg(account);
            }

            @Override
            public void onFail() {
                imvpView.showFailMsg();
            }
        });
    }
}
